package com.glory.gloryquickui.entity

import com.google.gson.annotations.SerializedName

/**
 * @author HX
 * @date 2021/4/7
 * @desc 控件配置
 */
data class ConfigBean(
    var border: Boolean = false, // false
    var changeTag: Boolean = false, // true
    var dataConsumer: String = "", // options
    var dataPath: String = "", // list
    var dataType: String = "", // manual
    var defaultValue: Any? = Any(), // null
    var document: String = "", // https://element.eleme.cn/#/zh-CN/component/input
    var eventType: String = "", // manual
    var eventContent: String = "",
    var eventName: String = "", //
    var formId: String = "", // 1011617782244504
    var fromId: String = "",
    var fromNeed: Boolean = false, // false
    var isModal: Boolean = false, // false
    var isOpenWin: Boolean = false, // false
    var label: String = "", // 单行文本
    var labelWidth: Any? = Any(), // null
    var layout: String = "", // colFormItem
    var option: SingleChooseOptionsBean = SingleChooseOptionsBean(),
    var options: MutableList<CascadeChooseOptionsBean> = mutableListOf(),
    var optionType: String = "", // default
    var regList: MutableList<Any> = mutableListOf(),
    var renderKey: String = "", // 10116177822445041617782244504
    var required: Boolean = false, // true
    var showLabel: Boolean = false, // true
    var span: Int = 0, // 24
    var tag: String = "", // el-input
    var tagIcon: String = "", // input
    var url: String = "", // https://www.fastmock.site/mock/f8d7a54fb1e60561e2f720d5a810009d/fg/cascaderList
    var visible: Boolean = false, // true
    var children: ArrayList<FieldBean> = arrayListOf(),
    var baseData: FieldBean.BaseData = FieldBean.BaseData(),
    @SerializedName(value = "dataSourceTable", alternate = ["dataSource", "sourceTable"])
    var dataSourceTable:ArrayList<String> =  arrayListOf(),
    var dataConnectId: String = "", // input
    @SerializedName(value = "dataParamsTable", alternate = ["params", "dataSourceColumns"])
    var dataParamsTable:ArrayList<DataTableBean> = arrayListOf(),

    var requestUrl:String = "",
    var requestMethod:String = "",
    var request:InterfaceRequest = InterfaceRequest(),
    var response:InterfaceRequest = InterfaceRequest()

)

data class InterfaceRequest(
    var json: String = "",
    var variableList:ArrayList<VariableBean> = arrayListOf()
)

data class VariableBean(
    var key: String = "",
    var path:ArrayList<String> = arrayListOf()
)

